package day8homework;

public class Person {
	private String name;
	private String sex;
	private int age;
	private String nationality;
	
	public Person() {
		super();
	}

	public Person(String name, String sex, int age, String nationality) {
		super();
		this.name = name;
		this.sex = sex;
		this.age = age;
		this.nationality = nationality;
	}
	//吃饭方法
	public void eat() {
		System.out.println("人在吃饭");
	}
	//睡觉
	public void sleep() {
		System.out.println("人在睡觉");
	}
	//工作
	public void work() {
		System.out.println("人在工作");
	}
	
	@Override
	public String toString() {
		return "Person [name=" + name + ", sex=" + sex + ", age=" + age + ", nationality=" + nationality + "]";
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public String getNationality() {
		return nationality;
	}

	public void setNationality(String nationality) {
		this.nationality = nationality;
	}
}
